-- GENERATED SPELL FOR [Dreadmaul Warlock] --


function spell0_5978(pUnit, Event) --@Curse of Blood,n/a--
pUnit:FullCastSpellOnTarget(8282,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5978', 2000, 1)
end

function spell1_5978(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20298,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5978', 3000, 1)
end

function Sorts_5978(pUnit, Event)
local choix_sorts_5978 = math.random(0, 1)
if choix_sorts_5978 == 0 then
pUnit:RegisterEvent('spell0_5978', 1, 1)
end
if choix_sorts_5978 == 1 then
pUnit:RegisterEvent('spell1_5978', 1, 1)
end
end

function mob5978_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5978', math.random(1500, 3000), 1)
end

function mob5978_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5978_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5978_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5978, 1, 'mob5978_Action')
RegisterUnitEvent(5978, 2, 'mob5978_Leave')
RegisterUnitEvent(5978, 3, 'mob5978_Kill')
RegisterUnitEvent(5978, 4, 'mob5978_Die')
